<extend name="Public/base"/>

<!-- 子导航 -->
<block name="sidebar">
    <include file="sidemenu" />
</block>

<block name="body">
	<div class="main-title">
		<h2>抢购商品</h2>
	</div>
	<!-- 工具栏 -->
	<div class="product_headcut">
	<div class="f1">
		<div class="add-product">
			<a class="btn" href="/qgh/admin.php?s=/Article/panic-add.html">新增</a>
		</div>
		<!-- 高级搜索 -->
		<div class="search-form fr cf" style="margin-top: 9px">
			<div class="sleft" >
				<input type="text" name="title" class="search-input" value="{:I('title')}" placeholder="商品ID/商品名称">
				<a class="sch-btn" href="javascript:;" id="search" url="{:U('article/index','pid='.I('pid',0).'&cate_id='.$cate_id,false)}"><i class="btn-search"></i></a>
			</div>
	     </div>
	</div>

	</div>


	<!-- 数据表格 -->
    <div class="data-table">
		<table>
            <!-- 表头 -->
            <thead>
                <tr>
                    <th class="row-selected row-selected">
                        <input class="check-all" type="checkbox">
                    </th>
                    <volist name="list_grids" id="field">
                        <th>{$field.title}</th>
                    </volist>
					<th>商品ID</th>
					<th>商品名称</th>
					<th>售价</th>
					<th>库存</th>
					<th>销量</th>
					<th>操作</th>
                </tr>
            </thead>

            <!-- 列表 -->
            <tbody>

                    <tr>
                        <td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
						<td>6</td>
						<td>这个是商品名称</td>
						<td>677</td>
						<td>762</td>
						<td>168</td>
						<td>
							<a>上架</a>&nbsp;
							<a>编辑</a>&nbsp;
							<a>删除</a>
						</td>
                    </tr>
					<tr>
						<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
						<td>5</td>
						<td>这个是商品名称</td>
						<td>822</td>
						<td>176</td>
						<td>77</td>
						<td>
							<a>上架</a>&nbsp;
							<a>编辑</a>&nbsp;
							<a>删除</a>
						</td>
					</tr>
					<tr>
						<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
						<td>4</td>
						<td>这个是商品名称</td>
						<td>24</td>
						<td>442</td>
						<td>16</td>
						<td>
							<a>上架</a>&nbsp;
							<a>编辑</a>&nbsp;
							<a>删除</a>
						</td>
					</tr>
					<tr>
						<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
						<td>3</td>
						<td>这个是商品名称</td>
						<td>2434</td>
						<td>5443</td>
						<td>1554</td>
						<td>
							<a>上架</a>&nbsp;
							<a>编辑</a>&nbsp;
							<a>删除</a>
						</td>
					</tr>
            </tbody>
        </table>
		<aside class="paging">
			<a>第一页</a>
			<a>1</a>
			<a>2</a>
			<a>3</a>
			<a>…</a>
			<a>1004</a>
			<a>最后一页</a>
		</aside>
	</div>
	<!-- 分页 -->
    <div class="page">
        {$_page}
    </div>
 </div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">
$(function(){
	//搜索功能
	$("#search").click(function(){
		var url = $(this).attr('url');
		var query  = $('.search-form').find('input').serialize();
		query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
		query = query.replace(/^&/g,'');
		if( url.indexOf('?')>0 ){
			url += '&' + query;
		}else{
			url += '?' + query;
		}
		window.location.href = url;
	});
	//回车搜索
	$(".search-input").keyup(function(e){
		if(e.keyCode === 13){
			$("#search").click();
			return false;
		}
	});
	//导航高亮
	highlight_subnav('/qgh/admin.php?s=/User/index.html');
</script>
</block>
